package com.winner.command_parrern;

/**
 * 具体命令
 *
 * @Author wangxinle5
 * @since 2024-04-22
 */
public class ConcreteCommand implements Command{

    CompanyArmy companyArmy; // 含有接受者士兵的引用

    public ConcreteCommand(CompanyArmy companyArmy) {
        this.companyArmy = companyArmy;
    }

    @Override
    public void execute() { // 封装指挥官的命令
        companyArmy.sneakAttack(); // 偷袭敌人
    }
}
